package com.csu.client.module.messageProcess;


import com.csu.client.logger.EIMLogger;
import com.csu.client.module.vo.Cache;
import com.csu.message.BaseMessage;
import com.csu.message.CinemaRequestMessage;
import com.daohang361.imqq.ui.EIMTalkFrame;
import com.daohang361.imqq.ui.cinema.CinemaIPPort;

public class CinemaRequestProcess implements IMessageProcess {

	public void processMessage(BaseMessage message) {

		 final CinemaRequestMessage requestMessage=(CinemaRequestMessage)message;
		 EIMLogger.INFO(message);
		 java.awt.EventQueue.invokeLater(new Runnable() {
				public void run() {
					 String friendQQ=requestMessage.getSrcQQ();
					 String owerQQ=requestMessage.getDestQQ();
					 Cache cache=Cache.getInstance();
					 EIMTalkFrame qqTalkFrame=cache.getTalkFrame(friendQQ);
					 qqTalkFrame.addcinemaJPanel("get");
					 if(!qqTalkFrame.isVisible()){
							qqTalkFrame.setVisible(true);
						}
					 CinemaIPPort cinemaIPPortBean=new CinemaIPPort();
					 
					 cinemaIPPortBean.setSendMediaIP(requestMessage.getSendCinemaDataIP());
					 qqTalkFrame.setCinemaIPPortBean(cinemaIPPortBean);
					 
					 EIMLogger.Error("SendCinemaDataIP:"+requestMessage.getSendCinemaDataIP());
					 EIMLogger.Error("CinemaDataPort:"+requestMessage.getSendCinemaDataPort());
				}
			});
	
	}

}
